<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        div{
            width: 500px;
            height: 500px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div></div>
    <script>
        var div = document.querySelector("div")
        /* 开始触摸 */
        div.ontouchstart = function(){console.log("开始触摸");}
        /* 触摸中... */
        div.ontouchmove = function(){console.log("触摸中");}
        /* 触摸结束 */
        div.ontouchend = function(){console.log("触摸结束");}
    </script>
</body>
</html>